| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As MessageStream Dim buffer() As Byte instance.Write(buffer) | |
| C++/CLI | |
|---|---|
public: void Write( array<byte>^ buffer ) | |
Parameters
- buffer
- The source location of the data to write.
| Exception | Description |
|---|---|
| System.IO.IOException | Thrown when the Stream is not writable. |
| System.ArgumentNullException | Thrown when the buffer is null. |
| System.ArgumentOutOfRangeException | Thrown when the offset is less than zero or when count is less than or equal to zero. |
| System.ArgumentException | Thrown when the (offset + count) > buffer.Length. |
This method is a convenience overload for all derived classes by writing the entire buffer to the Stream. This method calls Write(buffer, 0, buffer.length).
Target Platforms: Microsoft .NET Framework 2.0